cmake_minimum_required(VERSION 3.10)

project(phytest)

find_package(glm REQUIRED)
find_package(SDL2 REQUIRED)
find_library(SDL2_GFX_LIBRARY
    NAMES SDL2_gfx
    PATHS /usr/local/lib /usr/lib
    PATH_SUFFIXES lib
)

file(GLOB SRC_FILES 
  "${PROJECT_SOURCE_DIR}/src/*.h"
  "${PROJECT_SOURCE_DIR}/src/*.cpp"
  "${PROJECT_SOURCE_DIR}/src/Colide/*.h"
  "${PROJECT_SOURCE_DIR}/src/Colide/*.cpp"
  "${PROJECT_SOURCE_DIR}/src/Base/*.h"
  "${PROJECT_SOURCE_DIR}/src/Base/*.cpp"
  "${PROJECT_SOURCE_DIR}/src/Force/*.h"
  "${PROJECT_SOURCE_DIR}/src/Force/*.cpp"
  "${PROJECT_SOURCE_DIR}/src/Object/*.h"
  "${PROJECT_SOURCE_DIR}/src/Object/*.cpp"

)

add_executable(${CMAKE_PROJECT_NAME} ${SRC_FILES})

target_compile_features(phytest PRIVATE cxx_std_11)

target_link_libraries(phytest
  PRIVATE
  glm::glm
)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
  SDL2::SDL2
  SDL2_gfx
)

